/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UCM;

import Source.DisplayDeleteAirport;
import Views.ViewDisplayDeleteAirport;

/**
 *
 * @author Joshua King
 */
public class UCDisplayDeleteAirport implements UCController {
    private ViewDisplayDeleteAirport view;
    private DisplayDeleteAirport model = new DisplayDeleteAirport();

    /**
     * Initialises the view.
     * @param view
     */
    public UCDisplayDeleteAirport(ViewDisplayDeleteAirport view) {
        this.view = view;
        view.loadTo(model);
    }

    /**
     * Precondition: user is logged in as manager
     * 1. Users clicks on the delete airport button.
     * 2. System get Airport Data.
     * 3. System displays delete airport view.
     * Postcondition: user is on delete airport page.
     */
    public void run() {
        //2. System get Airport Data.
        model.retrieveAirport();
        //3. System displays delete airport view.
        view.setDeleteAirportVisible();
    }
}
